package com.we823.project.repository.dao.repo;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import com.we823.project.model.repo.MaterialBomModel;

@Repository("materialBomRepository")
public interface MaterialBomRepository extends JpaRepository<MaterialBomModel, Integer> {
	List<MaterialBomModel> findByCode(String code);

	Page<MaterialBomModel> findByCode(String code, Pageable pageable);

	Page<MaterialBomModel> findByCodeContaining(String query, Pageable pageable);

	List<MaterialBomModel> findByMaterialCodeAndCode(String materialCode,String code);

	List<MaterialBomModel> findByProcessAndCode(String process, String destCode);

	List<MaterialBomModel> findByModelAndMaterialDesc(String model, String color);
}
